<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ include file="/WEB-INF/jsp/common/_includes.jsp"%>
<jsp:include page="/WEB-INF/jsp/common/_head.jsp"/>
<link rel="stylesheet" href="/static/vendor/upload/css/jquery.fileupload.css" type="text/css" />
<div class="ui grid">
    <div class="row">
        <div class="column">
            <div class="ui two column grid">
                <div class="three wide column">
                    <jsp:include page="/WEB-INF/jsp/common/_sidebar.jsp">
                        <jsp:param name="index" value="1402"/>
                    </jsp:include>
                </div>
                <div id="container" class="thirteen wide column">
                    <div class="alert alert-success w200 center-block text-center " style="display: none; " role="alert"></div>
                    <ol class="breadcrumb">
                        <li><a href="/">后台管理</a></li>
						<li class="active">新增广告</li>
                    </ol>
			<form class="form-horizontal" id="advertisementForm" method="post"action="/advertisement/save">
				<input type="hidden" id="js_url" name="attachUrl" >
				<div class="form-group">
					<label for="name" class="col-sm-3 control-label">广告实体主要图片</label>
					<div class="col-sm-5">
						<img id="preview" width="300px" height="170px" src="${advertisement.attachUrl!=null?advertisement.attachUrl:'http://placehold.it/300x170'}">
					</div>
					<div class="col-sm-2">
						<span class="btn btn-success btn-block fileinput-button">
							<i class="glyphicon glyphicon-plus"></i>
							<span>上传图片</span>
							<input id="fileupload" type="file"  name="attachFile" data-url="/img/upload" multiple>
						</span>
					</div>
				</div>
			    
			    <div class="form-group">
					<label class="col-sm-3 control-label">广告类别分类</label>
					<div class="col-sm-5">
						<select class="form-control" name="categoryId">
							<option value="">请选择广告类别分类</option>
							<c:forEach items="${adCategoryTypeList}" var="adCategory">
								<option value="${adCategory.code}">${adCategory.text}</option>
							</c:forEach>
						</select>
					</div>
				</div>
			    
			    <div class="form-group">
					<label class="col-sm-3 control-label">广告实体名称</label>
					<div class="col-sm-5 desc">
						<input type="text" class="form-control" id="title" name="title" placeholder="输入广告实体内容">
					</div>
				</div>
			
				<div class="form-group">
					<div class="col-sm-offset-3 col-sm-2">
						<button type="submit" class="btn btn-block btn-orange">提交</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
</div>
    </div>
<jsp:include page="/WEB-INF/jsp/common/_foot.jsp"></jsp:include>
<script src="/static/vendor/upload/js/vendor/jquery.ui.widget.js"></script>
<script src="/static/vendor/upload/js/jquery.iframe-transport.js"></script>
<script type="text/javascript" src="/static/vendor/jquery.validate/jquery.validate.js"></script>
<script src="/static/vendor/upload/js/jquery.fileupload.js"></script>
<script type="text/javascript" src="/static/js/advertisement/add.js"></script>